import java.util.*;
public class slojenie {
	static int length=10;
	static int len=length;
	public static void sloj(){
		
		
		int [] arr1= new int [length];
		int [] arr2 = new int [length];
		int [] arr3 = new int [length+1];
		
			for(int i=length; i>0; i--){
				arr1[length-1] = (int)(Math.random()*9);
				arr2[length-1] = (int)(Math.random()*9);
				if(arr3[length]!=0){
				arr3[length]= arr1[length-1]+arr2[length-1] + 1;
				if(arr3[length] >= 10){
					arr3[length]=arr3[length] % 10;
					arr3[length-1]=arr3[length-1] + 1;
				}
			}
				else{
					arr3[length]= arr1[length-1]+arr2[length-1];
					if(arr3[length] >= 10){
						arr3[length]=arr3[length] % 10;
						arr3[length-1]=arr3[length-1] + 1;
						}
				}
				length--;
		}
		for(int i= 0; i<len; i++){
			System.out.print( arr1[i]);}
			System.out.println();
		for(int i= 0; i<len; i++){
			System.out.print( arr2[i]);}
			System.out.println();
		for(int i= 0; i<len+1; i++){
			System.out.print(arr3[i]);}
			System.out.println();
		}
		
	public static void main(String[] args) {
		sloj();
		}}


